extends "../suweiailuoxiya-3/suweiailuoxiya-3.gd"


var baseId = ""
var upText1 = "北极孤狼额外提高30%暴击率"
var upText2 = "冰结锋芒伤害提高50%"
func _extInit():
	._extInit()
	lv = 4             #等级的设置
	addSkill("炮击对目标直线上的敌人造成[炮击*0.3]的技能伤害并附加3层<霜冻>", "冰结锋芒")

func normalAtkChara(cha):
	.normalAtkChara(cha)
	qx(cha)

func qx(cha):
	var eff:Eff = newEff("sk_feiZhan",sprcPos)
	eff._initFlyPos(position + (cha.position - position).normalized() * 1200, 800)
	eff.connect("onInCell",self,"effInCell")
var p4 = 1
func effInCell(cell):
	var cha = matCha(cell)
	if cha == null:
		cha = matCha(cell + Vector2(0, 1))
	if cha == null:
		cha = matCha(cell + Vector2(0, -1))
	if cha != null and cha.team != team:
		azurHurtChara(cha, att.atk*0.3, sys.HurtType.WEAPON, sys.AtkType.SKILL, "冰结锋芒", false, p4)
		castBuff(cha, buff.b_shuangDong.new(3))

func upgrade():
	.upgrade()
	if upgraded == 2:
		p4 = 1.5